﻿namespace OnlineVideos.RingToneEditor
{
    using System;
    using System.IO;
    using System.Runtime.InteropServices;

    //[StructLayout(LayoutKind.Sequential, Pack=2)]
    public class Gsm610WaveFormat : WaveFormat
    {
        private short samplesPerBlock;
        public Gsm610WaveFormat()
        {
            base.waveFormatTag = WaveFormatEncoding.Gsm610;
            base.channels = 1;
            base.averageBytesPerSecond = 0x659;
            base.bitsPerSample = 0;
            base.blockAlign = 0x41;
            base.sampleRate = 0x1f40;
            base.extraSize = 2;
            this.samplesPerBlock = 320;
        }

        public short SamplesPerBlock
        {
            get
            {
                return this.samplesPerBlock;
            }
        }
        public override void Serialize(BinaryWriter writer)
        {
            base.Serialize(writer);
            writer.Write(this.samplesPerBlock);
        }
    }
}

